#pragma once

#include "Ray.h"
#include "Vector3f.h"

class SlopeRayColumn
{
public:
    int numRays;
    Vector3f origin;
    Ray flatRay;
    float dirX, dirY;
    float* dirZ;

    /**
     * Creates a new SlopeRayColumn using the given directions.
     * Uses dirZ, but does not delete it on deconstruction.
     * dirZ must be ordered from lowest to highest.
     */
    SlopeRayColumn(const Vector3f& origin, float dirX, float dirY, float* dirZ, int numRays);

    Ray getRay(int index) const;
    Ray getSlopeRay(int index) const;

    bool rectIndices(int& start, int& end, const Vector3f& min, const Vector3f& max) const;
};
